$package('Bdth.FuncConfig');
Bdth.FuncConfig = function () {
	var _box = null;
	//var username = $("#username").val();
	var _this = {
		config: {
			dataGrid: {
				title: '权限菜单列表',
				url: 'dataList',
				//queryParams: { "username": username },
				columns: [[
					{field: 'id', checkbox: true, title: 'id'},
					{field: 'funcName', title: '权限菜单名称', width: 120, sortable: false},
					{
						field: 'funcType', title: '菜单类型', width: 120, sortable: false,
						formatter: function (value, row, index) {
							if (value == 1)
								return "主菜单";
							if (value == 2)
								return "右键命令菜单";
							if (value == 3)
								return "地图工具";
							if (value == 4)
								return "终端命令工具栏";
							else
								return "";
						}
					},
					{field: 'parentFuncName', title: '上级菜单', width: 120, sortable: false},
					{field: 'url', title: 'URL地址', width: 120, sortable: false},
				]],
				toolbar: [
					{id: 'btnadd', text: '添加', btnType: 'add'},
					{id: 'btnedit', text: '修改', btnType: 'edit'},
					{id: 'btndelete', text: '删除', btnType: 'remove'}
				]
			}, action: {
				add_editForm: '/view/funcConfig/form.html',
				remove: 'fakeDelete'
			},
			wid_height: {
				width: 600,
				height: 300
			},
		},
		init: function () {
			_box = new DataGrid(_this.config);
			_box.init();
		}
	}
	return _this;
}();

$(function () {
	Bdth.FuncConfig.init();
});		